package org.springblade.modules.repair.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author zcc
 * @version 1.0
 * @date 2021/9/24 10:35
 */
@Getter
@AllArgsConstructor
public enum PlanContentCheckTypeEnum {

	/**
	 * 对应数据库表里面的type_status字段
	 */
	HALF_MONTH(1, "半月"),
	QUARTER(2, "季度"),
	HALF_YEAR(3, "半年"),
	YEAR(4, "年度"),
	USER_DEFINED(5, "自定义"),
	SPECIAL(6, "专项");

	final int id;
	final String name;

	public static String getName(Integer id){
		PlanContentCheckTypeEnum[] enums = PlanContentCheckTypeEnum.values();
		for (PlanContentCheckTypeEnum typeEnum : enums) {
			if(typeEnum.getId() == id){
				return typeEnum.getName();
			}
		}
		return null;
	}

}
